<?php /* Smarty version Smarty-3.1.18, created on 2017-05-17 08:15:40
         compiled from "/data/www/mystery/protected/modules/webadmin/views/network/bank.tpl" */ ?>
<?php /*%%SmartyHeaderCode:125423593254bfaf2e81ad27-33205048%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c81acf1d782b0055cc51cb88e4f887aff3635eb9' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/network/bank.tpl',
      1 => 1494904922,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '125423593254bfaf2e81ad27-33205048',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_54bfaf2e8626d1_09913443',
  'variables' => 
  array (
    'list' => 0,
    'val' => 0,
    'pages' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54bfaf2e8626d1_09913443')) {function content_54bfaf2e8626d1_09913443($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<script type="text/javascript">
function AutoResizeImage(maxWidth,maxHeight,objImg){
    var img = new Image();
    img.src = objImg.src;
    var hRatio;
    var wRatio;
    var Ratio = 1;
    var w = img.width;
    var h = img.height;
    wRatio = maxWidth / w;
    hRatio = maxHeight / h;
    if (maxWidth ==0 && maxHeight==0){
        Ratio = 1;
    }else if (maxWidth==0){
        if (hRatio<1) Ratio = hRatio;
    }else if (maxHeight==0){
    if (wRatio<1) Ratio = wRatio;
    }else if (wRatio<1 || hRatio<1){
        Ratio = (wRatio<=hRatio?wRatio:hRatio);
    }
    if (Ratio<1){
        w = w * Ratio;
        h = h * Ratio;
    }
        objImg.height = h;
        objImg.width = w;
}
</script>
    <table width="100%" border="0" cellspacing="0">
      <tr>
        <td width="13%" valign="top">
            <?php echo $_smarty_tpl->getSubTemplate ("../common/left.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

        </td>
        <td width="87%" valign="top"><table width="100%" border="0" cellspacing="0">
            <tr>
              <td><div class="subnav">
                  <div class="content-menu ib-a blue line-x"> <a href="javascript:;" class="on"><em>银行管理</em></a><span>|</span> <a href="/webadmin/network/addbank"><em>添加银行</em></a>
                    <div class="clearbox"></div>
                  </div>
                </div>
                <div class="pad_10">
                  <div class="table-list">
                    <table width="100%">
                      <thead>
                        <tr>
                          <th width="20%">银行名称</th>
                          <th width="20%">银行域名</th>
                          <th width="40%">背景/LOGO</th>
                          <th width="20%">管理操作</th>
                        </tr>
                      </thead>
                      <tbody>
                          <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                        <tr onMouseOver="this.className='tr2'" onMouseOut="this.className='tr1'" id="bank_<?php echo $_smarty_tpl->tpl_vars['val']->value['bank_id'];?>
" class="tr1">
                            <td  align="center"><a href="/webadmin/network/list?bank_id=<?php echo $_smarty_tpl->tpl_vars['val']->value['bank_id'];?>
"><span style=""><?php echo $_smarty_tpl->tpl_vars['val']->value['bank_name'];?>
</span></a> </td>
                          <td align="center"><?php echo strtoupper($_smarty_tpl->tpl_vars['val']->value['domain']);?>
</td>
                          <td align="center">
                              <?php if ($_smarty_tpl->tpl_vars['val']->value['background']) {?><img width="50" height="50" src="<?php echo $_smarty_tpl->tpl_vars['val']->value['background'];?>
" onload="AutoResizeImage(40,0,this)" /><?php }?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                              <?php if ($_smarty_tpl->tpl_vars['val']->value['logo']) {?><img width="50" height="50" src="<?php echo $_smarty_tpl->tpl_vars['val']->value['logo'];?>
" onload="AutoResizeImage(40,0,this)" /><?php }?>
                          </td>
                          <td align="center">
                              <a href="javascript:;" onclick="up_attach(<?php echo $_smarty_tpl->tpl_vars['val']->value['bank_id'];?>
);">上传附件</a> | 
                             <a href="javascript:;" onclick="up_network_attach(<?php echo $_smarty_tpl->tpl_vars['val']->value['bank_id'];?>
);">网点通用附件</a> | 
                              <a href="/webadmin/network/editbank?bank_id=<?php echo $_smarty_tpl->tpl_vars['val']->value['bank_id'];?>
">修改</a> | 
                                 <a href="javascript:;" onclick="del_bank(<?php echo $_smarty_tpl->tpl_vars['val']->value['bank_id'];?>
);">删除</a> | 
                             <a href="javascript:;" onclick="open_baobei(<?php echo $_smarty_tpl->tpl_vars['val']->value['bank_id'];?>
);">开通报备</a> 
                            </td>
                        </tr>
                        <?php } ?>
                      </tbody>
                    </table>
                      <div style="float:right;"><?php echo $_smarty_tpl->tpl_vars['pages']->value;?>
</div>
                  </div>
                </div></td>
            </tr>
          </table></td>
      </tr>
    </table>
<script>
//删除银行
function del_bank(bank_id){
    if (confirm('确定删除？删除后旗下网点信息不再保存')) {
        $.getJSON('/webadmin/network/delbank',{bank_id:bank_id},function(res){
            if (res.status==1) {
                $('#bank_'+bank_id).remove();
            }
            alert(res.note);
        });
    }
}
//银行上传网点附件
function up_attach(bank_id){
    $.layer({
        type: 2, 
        title: '银行网点附件上传',
        border:[10, 0.3, '#000'],
        closeBtn:[0, true],
        shade: [0.5, '#000'],
        offset: ['100px', ''],
        area: ['400px', '400px'],
        iframe: {src: '/webadmin/network/UpAttach?bank_id='+bank_id}
     });
}
//网点附件
function up_network_attach(bank_id){
    $.layer({
        type: 2, 
        title: '银行网点附件上传',
        border:[10, 0.3, '#000'],
        closeBtn:[0, true],
        shade: [0.5, '#000'],
        offset: ['100px', ''],
        area: ['400px', '400px'],
        iframe: {src: '/webadmin/network/CommonAttach?bank_id='+bank_id}
     });
}
//银行下面网点开通报备
function open_baobei(bank_id){
    if (confirm('确定下面网点全部开通报备？')) {
        $.getJSON('/webadmin/network/OpenBaobei',{bank_id:bank_id},function(res){
            alert(res.note);
        });
    }
}
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
